<!--
 * @Description:
 * @Author: 崔堂袁
 * @Date: 2021-04-16 16:12:00
 * @LastEditTime: 2021-04-27 15:37:58
-->
<template>
  <div class="hello">
    <button @click="aaa">🍎</button>
  </div>
</template>

<script>
// import axios from 'axios'
import { getCurrentInstance } from 'vue'
export default {
  setup () {
    const { proxy } = getCurrentInstance()
    const aaa = () => {
      const name = 'cty'
      // const age = 24
      proxy.$http.post('/api/user/selectUser', { name })
        .then(res => {
          console.log(res)
        })
        .catch(err => {
          console.log(err)
        })
    }

    return {
      aaa
    }
  }
}
</script>

<style scoped lang='less'>
.hello {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
</style>
